package com.yixq.soa.service.comm.utils;

import com.yixq.soa.service.comm.ResultData;
import org.slf4j.Logger;

/**
 * Created by marvin on 2017/4/22.
 */
public class ResultDataUtils {

    /**
     * 合并结果并打印提示信息
     * @param resultData
     * @param code
     * @param desc
     * @param logger
     * @return
     */
    public static ResultData mergeData(ResultData resultData, String code, String desc,Logger logger){
        if(logger!=null){
            logger.info(desc);
        }
        resultData.setCode(code);
        resultData.setDesc(desc);

        return resultData;
    }
}
